# Maintainer: prspkt <prspkt@protonmail.com>
pkgname=py3-werkzeug
_pkgname=Werkzeug
pkgver=2.0.3
pkgrel=0
pkgdesc="The WSGI swiss-army knife"
options="!check" # Tests fail with newer py3-packaging
url="https://werkzeug.palletsprojects.com/"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-requests"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

replaces="py-werkzeug" # Backwards compatibility
provides="py-werkzeug=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

check() {
	fail="tests/test_debug.py"  # needs testing/py3-pytest-timeout
	PYTHONPATH=$PWD/build/lib pytest --ignore="$fail"
}

sha512sums="
1b6f68458f6e21ecd4ce270c7931dfa4f5ccbd7a0b50e49f9392acab29e9abd39d41fc37a132e9cf892b8d87406cbf9fec020dc1051227faea8d15534a45f369  Werkzeug-2.0.3.tar.gz
"
